//**********[权限]用户组数据权限管理***********/;
import request from '@/utils/request.js';

/**
 * 创建数据权限
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * data 参数 
 *  createBy:'', //$column.comments 	类型:string 非必填
 *  createDate:'', //$column.comments 	类型:string 非必填
 *  dataTypeId:'', //数据类型id:部门  设备  区域 等等 	类型:integer 非必填
 *  id:'', //$column.comments 	类型:integer 非必填
 *  scope:'', //权限范围:可见范围  可管理范围 维保范围  等等 	类型:string 非必填
 *  userGroupId:'', //$column.comments 	类型:integer 非必填
 *  val:'', //数据的值 	类型:string 非必填
 *  vals:'', // 	类型:array 非必填
 * @returns
 * ********
 */
export function postHmusergroupdata(data={}, config={}){
  return request({
    method: 'post',
    data,
    url: `/api/hmusergroupdata`,
    ...config,
  }) 
}

/**
 * 删除数据权限
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * scope:'', //scope 必填
 * dataTypeId:'', //dataTypeId 必填
 * userGroupId:'', //userGroupId 必填
 * @returns
 * ********
 */
export function deleteHmusergroupdata(params={}, config={}){
  return request({
    method: 'delete',
    params,
    url: `/api/hmusergroupdata`,
    ...config,
  }) 
}

/**
 * 查询数据权限
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * scope:'', //scope 必填
 * groupId:'', //groupId 必填
 * @returns
 * ********
 */
export function getHmusergroupdataGetTypeByScopeAndGroupId(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hmusergroupdata/getTypeByScopeAndGroupId`,
    ...config,
  }) 
}

/**
 * 获取用户已授权信息
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * scope:'', //scope 必填
 * component:'', //component 必填
 * appId:'', //appId 必填
 * @returns
 * ********
 */
export function getHmusergroupdataGetUserVal(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hmusergroupdata/getUserVal`,
    ...config,
  }) 
}

/**
 * 查询数据权限
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * groupId:'', //groupId 必填
 * @returns
 * ********
 */
export function getHmusergroupdataListByGroupId(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hmusergroupdata/listByGroupId`,
    ...config,
  }) 
}

/**
 * 删除数据权限
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * scope:'', //scope 必填
 * dataTypeId:'', //dataTypeId 必填
 * userGroupId:'', //userGroupId 必填
 * val:'', //val 必填
 * @returns
 * ********
 */
export function deleteHmusergroupdataRemoveval(params={}, config={}){
  return request({
    method: 'delete',
    params,
    url: `/api/hmusergroupdata/remove-val`,
    ...config,
  }) 
}